package com.mes.service.hy;

import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.mes.dao.hy.ProductMapper;
import com.mes.entity.hy.Product;

/**
 * 
 * @ClassName:ProductServiceImpl
 * @Description: 产品service实现层
 * @Author hy
 * @Date 2018-5-30上午10:04:21
 * @version 1.0
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class ProductServiceImpl implements IProductService {
	
	@Resource
	private ProductMapper productMapper;
	
	@Override
	public List<Product> selectCartype() {
		return productMapper.selectCartype();
	}
	
	@Override
	public List<Product> selectDistinguish() {
		return productMapper.selectDistinguish();
	}
	
	@Override
	public List<Product> selectClassification() {
		return productMapper.selectClassification();
	}
	
	@Override
	public List<Product> select(Product product) {
		return productMapper.select(product);
	}
	
	@Override
	public int productDelete(Long pid) {
		return productMapper.productDelete(pid);
	}
	
	@Override
	public int selectCount(Product product) {
		return productMapper.selectCount(product);
	}
	
	@Override
	public int insert(Product product) {
		return productMapper.insert(product);
	}
	
	@Override
	public int selectByNum(String num) {
		return productMapper.selectByNum(num);
	}
	
	@Override
	public List<Product> selectAll() {
		return productMapper.selectAll();
	}
	
	@Override
	public Product selectByID(Long pid) {
		return productMapper.selectByID(pid);
	}
	
	@Override
	public int update(Product product) {
		return productMapper.update(product);
	}

}
